package com.kylin.system.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kylin.common.core.entity.DataEntity;
import com.kylin.common.core.validator.constraint.NotRepeat;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 参数配置表 sys_config
 * 
 * @author wuhao
 * @since 1.0 - 2019-11-28
 */
@Data
@TableName("sys_config")
@NotRepeat(field = "configKey", message = "参数键名已存在")
public class SysConfig extends DataEntity<SysConfig>
{
    /** 参数名称 */
    @Excel(name = "参数名称", width = 20)
    @NotBlank(message = "参数名称不能为空")
    @Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
    private String configName;

    /** 参数键名 */
    @Excel(name = "参数键名", width = 20)
    @NotBlank(message = "参数键名长度不能为空")
    @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
    private String configKey;

    /** 参数键值 */
    @Excel(name = "参数键值", width = 15)
    @NotBlank(message = "参数键值不能为空")
    @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
    private String configValue;

    /** 系统内置（Y是 N否） */
    @Excel(name = "系统内置", dict = "sys_yes_no")
    private String configType;
    
    /** 参数分组 */
    private String configGroup;

    /** 表单类型 */
    private String formType;

    /** 不为空 */
    private String notNull;
}
